package com.tianji.learning.service;

import com.tianji.learning.domain.po.PointsBoard;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.domain.query.PointsBoardQuery;
import com.tianji.learning.domain.vo.PointsBoardVO;

import java.util.List;

/**
 * <p>
 * 学霸天梯榜 服务类
 * </p>
 *
 * @author yangyu
 * @since 2023-07-29
 */
public interface IPointsBoardService extends IService<PointsBoard> {


    /**
     * 分页查询学霸积分榜
     * @param query 积分排行榜分页查询条件：赛季id
     * @return 积分排行榜
     */
    PointsBoardVO queryPointsBoardBySeason(PointsBoardQuery query);

    /**
     * 创建表：新赛季，历史榜单表
     * @param season 上个月的赛季id
     */
    void createPointsBoardTableBySeason(Integer season);

    /**
     * 查询本月赛季榜单列表
     * @param key Redis的key
     * @param pageNo 起始页码
     * @param pageSize 每页条数
     * @return 学霸天梯榜列表
     */
    List<PointsBoard> queryCurrentBoardList(String key, Integer pageNo, Integer pageSize);
}
